﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Bakındur.Theming;

namespace Bakındur
{
    public partial class Options : Form
    {
        private Options()
        {
            InitializeComponent();

            cmbThemes.Items.AddRange(ThemeCollection.Current.Keys.ToList().ToArray());
        }

        private void Options_Load(object sender, EventArgs e)
        {
            cmbThemes.SelectedItem = Bakındur.Properties.Settings.Default.Theme;
        }

        private void buttonSave_Click(object sender, EventArgs e)
        {
            Bakındur.Properties.Settings.Default.Theme = cmbThemes.SelectedItem.ToString();
            Bakındur.Properties.Settings.Default.Save();
            Close();
        }

        private static Options form;
        public static void ShowOptions()
        {
            if (form == null)
                form = new Options();
            form.ShowDialog();
            Program.ApplyTheme();
        }
    }
}
